{extend name="base/main" /}
{block name="body"}
    <div class="wrapper wrapper-content animated fadeInRight">
		<div class="ibox float-e-margins">
			<div class="ibox-title">
				<h5>主页 / 分类管理 / 添加分类</h5>
				<div class="ibox-tools">
					<a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
					<a class="close-link"><i class="fa fa-times"></i></a>
				</div>
			</div>
			<div class="ibox-content">
				<form id="f" action="{:url('category/add')}" class="form-horizontal m-t">
					<div class="form-group">
						<label class="col-sm-1 control-label">分类名称：</label>
						<div class="col-sm-3">
							<input name="title" class="form-control" type="text" datatype="*2-16" errormsg="分类名称范围在2~16位之间！">
							<span class="help-block m-b-none Validform_checktip" ><i class="fa fa-info-circle"></i> 显示的菜单或是展示的功能名称</span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">选择上级分类：</label>
						<div class="col-sm-3">
							<select name="pid" class="form-control">
								<option value="0">---请选择父分类---</option>
								{volist name="tree" id="item"}
									<option value="{$item.id}">{$item.title_show}</option>
								{/volist}
							</select>
							<span class="help-block m-b-none Validform_checktip" ><i class="fa fa-info-circle"></i> 选择当前分类所属上级，不选默认为根分类</span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">显示图标：</label>
						<div class="col-sm-3">
							{:addons('upload',['type'=>'*.jpg;*.jpeg;*.png;*.gif','iahave'=>'yes','isloads'=>'yes','name'=>'icon','data'=>''])}
							<span class="help-block m-b-none Validform_checktip" ><i class="fa fa-info-circle"></i> 上传分类图标</span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">显示关键字：</label>
						<div class="col-sm-3">
							<input name="keywords" class="form-control" type="text" datatype="*0-80" errormsg="密码范围在2~60位之间！">
							<span class="help-block m-b-none Validform_checktip" ><i class="fa fa-info-circle"></i> 显示当前分类的关键字（keywords），多个使用英文逗号隔开（,）</span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">显示描述：</label>
						<div class="col-sm-3">
							<textarea name="description" class="form-control" datatype="*0-80" errormsg="最多可以输入50个字符！"></textarea>
							<span class="help-block m-b-none Validform_checktip" ><i class="fa fa-info-circle"></i> 在网站中显示的描述（description）</span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">排序：</label>
						<div class="col-sm-3">
							<input name="sort" class="form-control" type="text" value="0" datatype="n1-5" errormsg="只能输入0-99999的数字，长度不可以超过5位！">
							<span class="help-block m-b-none Validform_checktip" ><i class="fa fa-info-circle"></i>菜单排序，在左侧导航栏中只能菜单显示的顺序</span>
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-2 col-sm-offset-1">
							<button class="btn btn-primary" type="submit">提交</button>
							<button class="btn btn-default historygo" type="button">返回</button>
						</div>
					</div>
				</form>
			</div>
        </div>
    </div>
{/block}